<!DCOTYPE HTML>
<html>
<head>
	<meta charset="UTF-8" />
	<title>修改文章</title>
	<link rel="stylesheet" href="__PUBLIC__/Admin/libs/bootstrap-3.3.0/css/bootstrap.min.css"  />

	<script type="text/javascript" src="__PUBLIC__/Admin/js/jquery.1.11.1.min.js"></script>
	<script type="text/javascript" scr="__PIUBLIC__/Admin/libs/bootstrap-3.3.0/js/bootstrap.min.js"></script>

	<script type="text/javascript" src="__PUBLIC__/Admin/js/jquery.1.11.1.min.js"></script>
<style>
table{margin-top: 20px;}
td{padding-left: 10px;}
tr{height: 40px;  }
</style>
</head>
<body>
<nav class="navbar navbar-default" role="navigation">
    <div class="container-fluid">
    <div class="navbar-header">
        <a class="navbar-brand" href="#">后台</a>
    </div>
    <div>
        <ul class="nav navbar-nav">
            <li><a href="#">课程</a></li>
            <li><a href="{:U('/community')}">社区</a></li>
            <li class="active"><a href="{:U('index')}">文章</a></li>
            <li><a href="#">用户</a></li>
            <li><a href="#">设置</a></li>
        </ul>
    </div>
    </div>
</nav>
<div class="container">
	<div class="col-md-2" style="margin-top:30px; height:100%; border-right:1px solid #ccc;">
		<div style="margin-top:30px;">
			<a href="{:U('/ArticleType/index')}">文章类型管理</a>
		</div>
		<div>
			<a href="{:U('index')}">文章管理</a>
		</div>
	</div>
	<div class="col-md-10">
		<h1 style="text-align:center;">修改文章</h1>
		<form action="{:U('update')}" method="post" enctype="multipart/form-data">
			<table>
				<tr>
				<!-- 加载传入变量，在控制器中写了一个$this->data=$data(这个$data是控制器里的变量,前面的data是表示模板里的变量),所以模板里存在一个data变量，在模板这里的变量名是$data,这个$data中存在id的key值,$data.id是输出value值-->
					<input type="hidden" name="id" value="{$data.id}" >
					<!-- 设置隐藏的id用于提交后知道原id -->
					<td>
						标题:
					</td>
					<td>
						<input type="text" name="title" value="{$data.article_title}">
					</td>
				</tr>
				<tr>
					<td>
						类型:
					</td>
					<td>
						<input type="text" name="type" value="{$data.article_type}">
					</td>
				</tr>
				<tr>
					<td>
						关键字:
					</td>
					<td>
						<input type="text" name="keyword" value="{$data.key_word}">
					</td>
				</tr>
				<tr>
					<td  colspan="2">
						<div style="height: 210px; width: 210px; margin: 20px;">
							<input class="dropify" type="file" name="photo">
						</div>
					</td>
					<td></td>
				</tr>
				<tr>
					<td colspan="2">
						<textarea name="content" id="content">{$data.article_content}</textarea>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<div style="text-align: center; margin-top: 30px; margin-bottom: 30px;">
						<input type="submit">
						</div>
					</td>
				</tr>
			</table>
		</form>

		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/libs/dropify/dropify.min.css">
		<script type="text/javascript" src="__PUBLIC__/Admin/libs/dropify/dropify.min.js"></script>
		<script type="text/javascript">
			$('.dropify').dropify();
		</script>

 		<!-- 百度编辑器 -->
 		<script type="text/javascript" src="__PUBLIC__/Admin/libs/ueditor/ueditor.config.js"></script>

 		<script type="text/javascript" src="__PUBLIC__/Admin/libs/ueditor/ueditor.all.min.js"></script>

 		<script type="text/javascript">
 	 		var ue = UE.getEditor('content',{initialFrameHeight: 300});
		</script>
	</body>
</html>
